import { createRouter, createWebHistory } from 'vue-router'
import { basicRoutes } from './routes';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: basicRoutes
})

export async function resetRouter() {
  router.routes = basicRoutes;
}

export default router

export function toHome() {
  router.push("/");
}

export function toLogin() {
  router.push("/login");
}